function search_article() {
	var keyword = document.querySelector(".searchbox").value;
	location.href = "?keyword=" + encodeURIComponent(keyword);
}
//
function toWriteArticlePage(isLogin) {
    console.log(isLogin);
    if (isLogin === 'None' || isLogin !== 'true') {
        alert("您好，请登录");
        // 修正选择器，确保能触发登录模态框
        document.querySelector(".login span[data-bs-target='#exampleModal']").click();
    } else {
        window.open("/add_writing", "_blank");
    }
}
